<?php
	require_once("config.php");
	if(!$_SESSION['username'] || sha1(sha1($_SESSION['username'])) != $_SESSION['careful']) { header("Location: /index.php"); die(); }
	$token = set_token($_SESSION['username']);
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 

<!-- Hey, How you doing? My name is Shorty -->
<!-- Hey Shorty, Hows it going man? -->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" xmlns:og="http://opengraphprotocol.org/schema/" xmlns:fb="http://www.facebook.com/2008/fbml"> 
<head> 
	<meta http-equiv="content-type" content="text/html; charset=utf-8" /> 
	<title><?php echo $name ?> - Play for free!</title> 

	<script type="text/javascript"> 
		var andSoItBegins = (new Date()).getTime();
		var ad_keywords = "";
		document.habboLoggedIn = true;
		var habboName = "Sojobo";
		var habboReqPath = "http://exeyo.us";
		var habboStaticFilePath = "http://images.habbo.com/habboweb/63_1dc60c6d6ea6e089c6893ab4e0541ee0/68/web-gallery";
		var habboImagerUrl = "http://www.habbo.com/habbo-imaging/";
		var habboPartner = "";
		var habboDefaultClientPopupUrl = "http://exeyo.us/client.php";
		window.name = "ClientWndw";
		if (typeof HabboClient != "undefined") { HabboClient.windowName = "ClientWndw"; }
	</script> 


<link rel="alternate" type="application/rss+xml" title="Habbo Hotel - RSS" href="http://www.habbo.com/articles/rss.xml" /> 
<script src="/JS/libs2.js" type="text/javascript"></script>
<script src="/JS/visual.js" type="text/javascript"></script>
<script src="/JS/libs.js" type="text/javascript"></script>
<script src="/JS/common.js" type="text/javascript"></script>

<!-- <noscript> 
    <meta http-equiv="refresh" content="0;url=/client/nojs" />
</noscript> -->

<link rel="stylesheet" href="http://images.habbo.com/habboweb/63_1dc60c6d6ea6e089c6893ab4e0541ee0/292/web-gallery/static/styles/common.css" type="text/css" />

<link rel="stylesheet" href="http://images.habbo.com/habboweb/63_1dc60c6d6ea6e089c6893ab4e0541ee0/292/web-gallery/static/styles/habboflashclient.css" type="text/css" />
<link rel="stylesheet" href="/CSS/client.css" type="text/css" />
<script src="/JS/habboflashclient.js" type="text/javascript"></script>


<script type="text/javascript"> 
    FlashExternalInterface.loginLogEnabled = false;
    FlashExternalInterface.logLoginStep("web.view.start");
    
    var flashvars = {
            "client.allow.cross.domain" : "1", 
            "client.notify.cross.domain" : "0", 
            "connection.info.host" : "<?php echo $host ?>", 
            "connection.info.port" : "<?php echo $port ?>", 
            "site.url" : "<?php echo $siteurl ?>", 
            "url.prefix" : "<?php echo $siteurl ?>", 
            "client.reload.url" : "<?php echo $siteurl ?>/client.php", 
            "client.fatal.error.url" : "<?php echo $siteurl ?>/disconnect.php?err=flash_client_error", 
            "client.connection.failed.url" : "<?php echo $siteurl ?>/disconnect.php?err=client_connection_failed", 
            "external.variables.txt" : "<?php echo $external_vars ?>",
            "external.texts.txt" : "<?php echo $external_txts ?>", 
            "productdata.load.url" : "<?php echo $external_prdt ?>", 
            "furnidata.load.url" : "<?php echo $external_frni ?>", 
            "use.sso.ticket" : "1", 
            "sso.ticket" : "<?php echo $token ?>", 
            "processlog.enabled" : "0", 
            "account_id" : "1", 
            "client.starting" : "Please wait! <?php echo $name ?> is starting up...", 
            "flash.client.url" : "<?php echo $external_dcrs ?>", 
            "user.hash" : "", 
            "has.identity" : "0", 
            "flash.client.origin" : "popup",
            "token" : "<?php echo $token ?>"
    };
    var params = {
        "base" : "<?php echo $external_dcrs ?>",
        "allowScriptAccess" : "always",
        "menu" : "false"                
    };
    
    if (!(HabbletLoader.needsFlashKbWorkaround())) {
    	params["wmode"] = "opaque";
    }
    
    FlashExternalInterface.signoutUrl = "<?php echo $siteurl ?>/logout.php";

    var clientUrl = "<?php echo $external_dcrs ?>Habbo.swf";
    swfobject.embedSWF(clientUrl, "flash-container", "100%", "100%", "10.0.0", "http://images.habbo.com/habboweb/63_1dc60c6d6ea6e089c6893ab4e0541ee0/215/web-gallery/flash/expressInstall.swf", flashvars, params);
 
    window.onbeforeunload = unloading;
    function unloading() {
        var clientObject;
        if (navigator.appName.indexOf("Microsoft") != -1) {
            clientObject = window["flash-container"];
        } else {
            clientObject = document["flash-container"];
        }
        try {
            clientObject.unloading();
        } catch (e) {}
    }
</script>
</head> 
 

<body id="client" class="flashclient"> 
<div id="overlay"></div> 
<img src="http://images.habbo.com/habboweb/63_1dc60c6d6ea6e089c6893ab4e0541ee0/215/web-gallery/v2/images/page_loader.gif" style="position:absolute; margin: -1500px;" /> 

<div id="overlay"></div> 
<div id="client-ui" > 
    <div id="flash-wrapper"> 
    <div id="flash-container"> 
        <div id="content" style="width: 400px; margin: 20px auto 0 auto; display: none"> 
			<div class="cbb clearfix"> 
			    <h2 class="title">Error - Unable to load the Hotel</h2> 
			    <div class="box-content"> 
			        <p>This is normally when you don't have Adobe Flash Player installed on your computer.</p>  
				<p>Please <a href="/client/"><b>click here</b></a> to reload the page!</p>
			    </div> 
			</div> 
        </div> 
        <script type="text/javascript"> 
            $('content').show();
        </script> 
        <noscript> 
            <div style="width: 400px; margin: 20px auto 0 auto; text-align: center">
                <p>If you are not automatically redirected, please <a href="/client/nojs">click here</a></p>
            </div>
        </noscript> 
    </div> 
    </div> 
	<div id="content" class="client-content"></div>
</div> 
</body> 
</html>